package exception;

/**
 * 非法的年龄异常
 *
 * 自定义异常
 * 通常用来说明那些由于不符合业务逻辑导致的问题。
 *
 * 自定义异常要做到以下几点:
 * 1:类名做到见名知义
 * 2:继承自Exception类
 * 3:提供超类所有构造器
 */
public class IllegalAgeException extends Exception{
    public IllegalAgeException() {
    }

    public IllegalAgeException(String message) {
        super(message);
    }

    public IllegalAgeException(String message, Throwable cause) {
        super(message, cause);
    }

    public IllegalAgeException(Throwable cause) {
        super(cause);
    }

    public IllegalAgeException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }
}
